#ifndef __SENDER_H__
#define __SENDER_H__

#include <string>
#include <opencv2/opencv.hpp>
#include <redis++/redis++.h>

class Sender
{
public:
	virtual bool Send(const cv::Mat& frame, const std::string& task_id, int number) = 0;
};

class RedisSender : public Sender
{
public:
	explicit RedisSender(const std::string& uri, const std::string& key)
		: redis(uri), rootKey(key) {}
	bool Send(const cv::Mat& frame, const std::string& taskId, int number);

private:
	sw::redis::Redis redis;
	std::string rootKey;
	std::string currentTaskId;
};

#endif
